import { articles } from '@/api/list'
export default {
  namespaced: true,
  state: {
    newsList: []
  },
  mutations: {
    setNewsList (state, value) {
      state.newsList = value
    }
  },
  actions: {
    async getNewsList ({ commit }, id) {
      const res = await articles(id)
      commit('setNewsList', res.data.data.results)
      console.log(res)
    }
  },
  getters: {}
}
